import java.util.concurrent.*;

/**
 * Author：毕龙
 * Date: 2024/5/21 9:39
 */
public class Main {
    public static void main(String[] args) {
        ExecutorService service = Executors.newFixedThreadPool(5);
        for (int i = 0; i < 10; i++) {
            final int fnail = i;
            service.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println(Thread.currentThread().getName()+"--->"+fnail);
                }
            });
        }
        boolean terminated = service.isTerminated();
        System.out.println(terminated);

    }
}
